/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vodjaho.lab;

import java.util.Random;

/**
 *
 * @author Maxim A. Kanev <ask.me.makes@gmail.com> [mkanev]
 */
public class ColorUtil {

    private static final String[] hexValues = new String[] {
        "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"
    };

    public static String genRandomWebColor() {
        StringBuilder sb = new StringBuilder("#");
        Random random = new Random();
        for (int i=0; i<3; i++) {
            sb.append(hexValues[random.nextInt(hexValues.length)]);
        }
        return sb.toString();
    }

}
